package com.pubinfo.passbook.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author litiewang
 */
@Data
@Component
@ConfigurationProperties(prefix = "config")
public class ApplicationConfig {
  private String nsrsbh;
  private Tax tax;
  private Financial financial;
  private Esb esb;
  public Bank bank;
  @Data
  public static class Tax {
    private String url;
    private String password;
    public TaxApi api;
    
    @Data
    public static class TaxApi {
      private String queryByTime;
      private String fetchPage;
      private String invoiceFilePackageCount;
      private String invoiceFilePackageInfo;
  
    }
  }
  
  @Data
  public static class Esb {
    private String url;
    private String authorization;
    private EsbApi api;
  }
  
  @Data
  public static class Bank {
    private String appKey;
    private String APPSecret;
    
    private String url;
    
  }
  
  @Data
  public static class EsbApi {
    private String getWriteoffBaseData;
    private String gainWriteoffInstStatus;
    private String autoCreateWriteoff;
    private String getSapNumber;
  }
  
  @Data
  public static class Financial {
    private String url;
    private String password;
    public FinancialApi api;
    
    @Data
    public static class FinancialApi {
      private String billList;
      private String detailList;
      private String cancelLockedList;
      private String claimFeedback;
      private String cancelClaimFeed;
    }
  }
  
}
